package com.qingxin.wuye.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;

/**
 * 车位档案
 * WyCarport entity. 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wy_carport")
public class WyCarport extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {
	private static final long serialVersionUID = 6898990429145444724L;
	// Fields

	private String carportid;
	private WyCarportArea wyCarportArea;
	private String carportCode;
	private Integer status;//状态 （空置/在用）
	private String roomCode;
	private Date beginTime;//合同起始日期
	private Date endTime;//合同结束日期
	private String linkman;
	private String linktel;//联系人电话
	private String linkphone;//联系人手机
	private String carCode;
	private BigDecimal area;
	private String remark;
	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;

	private String gardenName;
	private String areaName;
	
	// Constructors

	/** default constructor */
	public WyCarport() {
	}

	
	public WyCarport(String carportid, String carportCode, Integer status,
			String roomCode, Date beginTime, Date endTime, String linkman,
			String linktel, String linkphone, String carCode, BigDecimal area,
			String remark, String gardenName, String areaName) {
		this.carportid = carportid;
		this.carportCode = carportCode;
		this.status = status;
		this.roomCode = roomCode;
		this.beginTime = beginTime;
		this.endTime = endTime;
		this.linkman = linkman;
		this.linktel = linktel;
		this.linkphone = linkphone;
		this.carCode = carCode;
		this.area = area;
		this.remark = remark;
		this.gardenName = gardenName;
		this.areaName = areaName;
	}


	/** full constructor */
	public WyCarport(WyCarportArea wyCarportArea, String carportCode,
			Integer status, String roomCode, Date beginTime,
			Date endTime, String linkman, String linktel,
			String linkphone, String carCode, BigDecimal area, String remark,
			String createBy, Date createTime, String updateBy,
			Date updateTime) {
		this.wyCarportArea = wyCarportArea;
		this.carportCode = carportCode;
		this.status = status;
		this.roomCode = roomCode;
		this.beginTime = beginTime;
		this.endTime = endTime;
		this.linkman = linkman;
		this.linktel = linktel;
		this.linkphone = linkphone;
		this.carCode = carCode;
		this.area = area;
		this.remark = remark;
		this.createBy = createBy;
		this.createTime = createTime;
		this.updateBy = updateBy;
		this.updateTime = updateTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "carportid", unique = true, nullable = false, length = 32)
	public String getCarportid() {
		return this.carportid;
	}

	public void setCarportid(String carportid) {
		this.carportid = carportid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "areaid")
	@JsonIgnore
	public WyCarportArea getWyCarportArea() {
		return this.wyCarportArea;
	}

	public void setWyCarportArea(WyCarportArea wyCarportArea) {
		this.wyCarportArea = wyCarportArea;
	}

	@Column(name = "carport_code", length = 50)
	public String getCarportCode() {
		return this.carportCode;
	}

	public void setCarportCode(String carportCode) {
		this.carportCode = carportCode;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "room_code", length = 50)
	public String getRoomCode() {
		return this.roomCode;
	}

	public void setRoomCode(String roomCode) {
		this.roomCode = roomCode;
	}

	@Column(name = "begin_time", length = 23)
	public Date getBeginTime() {
		return this.beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	@Column(name = "end_time", length = 23)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Column(name = "linkman", length = 50)
	public String getLinkman() {
		return this.linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	@Column(name = "linktel", length = 50)
	public String getLinktel() {
		return this.linktel;
	}

	public void setLinktel(String linktel) {
		this.linktel = linktel;
	}

	@Column(name = "linkphone", length = 50)
	public String getLinkphone() {
		return this.linkphone;
	}

	public void setLinkphone(String linkphone) {
		this.linkphone = linkphone;
	}

	@Column(name = "car_code", length = 50)
	public String getCarCode() {
		return this.carCode;
	}

	public void setCarCode(String carCode) {
		this.carCode = carCode;
	}

	@Column(name = "area", precision = 12, scale = 2)
	public BigDecimal getArea() {
		return this.area;
	}

	public void setArea(BigDecimal area) {
		this.area = area;
	}

	@Column(name = "remark", length = 2000)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "create_by", length = 50)
	public String getCreateBy() {
		return this.createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_by", length = 50)
	public String getUpdateBy() {
		return this.updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Column(name = "update_time", length = 23)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	
	@Transient
	public String getGardenName() {
		return gardenName;
	}
	public void setGardenName(String gardenName) {
		this.gardenName = gardenName;
	}

	@Transient
	public String getAreaName() {
		return areaName;
	}
	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}


}